import request from "./axios";

import axios from "axios";

let base = "/prod-api";

// 获取gis数据列表
export const queryGisList = (params) => {
    return request({
        url: "/gis/queryCellList",
        method: "post",
        data: params,
    });
};

// 根据Cgi查询
export const queryCellByCgi = (params) => {
    return request({
        url: "/gis/queryCellByCgi",
        method: "get",
        params,
    });
};

// 根据CelIName查询
export const queryCellListByCellName = (params) => {
    return request({
        url: "/gis/queryCellListByCellName",
        method: "get",
        params,
    });
};

// 根据stationName查询
export const queryCellListByStationName = (params) => {
    return request({
        url: "/gis/queryCellListByStationName",
        // url: '/gis/queryCellListByCellName',
        method: "get",
        params,
    });
};

// 导入kml
export const uploadGisLayer = (params) => {
    return request({
        url: "/gis/uploadGisLayer",
        method: "post",
        data: params,
        headers: {
            "Content-Type": "multipart/form-data",
        },
    });
};

// 图层列表
export const gueryGisLayerList = () => {
    return request({
        url: "/gis/queryGisLayerList",
        method: "get",
    });
};

// 点击图层列表获取文件流
export const getGisLayercontent = (params) => {
    return request({
        url: "/gis/getGisLayerContent",
        method: "get",
        params,
    });
};

// 站点健康度
export const queryStationSummary = (params) => {
    return request({
        url: "/nhpStationSummary/queryStationSummary",
        method: "get",
        params,
    });
};

// 网格管理
export const queryGridBasiclnfoList = (params) => {
    return request({
        url: "/gis/queryGridBasicInfoList",
        method: "get",
        params,
    });
};

// 获取健康度概览数据
export const getOverViewData = (params) => {
    return request({
        url: "/nhpStationSummary/querySummaryOverview",
        method: "get",
        params,
    });
};

// 网格管理 - 查找
export const queryGridByld = (params) => {
    return request({
        url: "/gis/queryGridById",
        method: "get",
        params,
    });
};

// 根据多边形查询
export const queryAreaHealthInfo = (params) => {
    return request({
        url: "/gis/queryAreaHealthInfo",
        method: "post",
        data: params,
    });
};

/* // 根据多边形查询
export const queryAreaHealthInfo = params => {
  return request({
    url: '/gis/queryAreaHealthInfo',
    method: 'get',
    params
  })
} */

// 周边搜索
export const queryGisDataByPOISearch = (params) => {
    return axios({
        method: "GET",
        url: "https://api.tianditu.gov.cn/v2/search",
        params,
    });
};

export const queryCellRelatedInfo = (params) => {
    return request({
        method: "GET",
        url: "/gis/queryCellRelatedInfo",
        params,
    });
};

export function queryCell5gList(data) {
    return request({
        url: "/gis/queryCell5gList",
        method: "post",
        data: data,
    });
}
